package com.example.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.domain.ResponseResult;
import com.example.domain.entity.Product;
import com.example.exception.FloraException;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

public interface ProductService extends IService<Product> {
    //ResponseResult getAllProductList();

    IPage<Product> getProductPage(Map<String, Object> condition, Integer pageNum, Integer pageSize);

    @Transactional
    Product add(Product product) throws FloraException;

    void update(Product product) throws FloraException;

    @Transactional
    void delete(Long id) throws FloraException;
}
